import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";

const routes: Array<RouteRecordRaw> = [
  { path: "/", redirect: "/company" },
  { path: "/company", component: () => import("@/views/companyView.vue"), meta: { title: "公司展示页" } },
  { path: "/oilDepot", component: () => import("@/views/oilDepotView.vue"), meta: { title: "油库展示页" } },
  { path: "/problem", component: () => import("@/views/problemView.vue"), meta: { title: "问题展示页" } },
  { path: "/person", component: () => import("@/views/personView.vue"), meta: { title: "个人展示页" } },
  { path: "/personRecDetail", component: () => import("@/views/personRecDetail.vue"), meta: { title: "处理记录详情页" } },
  { path: "/problemDetail", component: () => import("@/views/problemDetail.vue"), meta: { title: "问题详情页" } },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
